#include <EB0/EB0.h>

namespace EB0
{
namespace Window
{
#pragma region Constructor / Destructor
	// Constructor
	DefaultWindowListener::DefaultWindowListener()
	{
		// Pass
	}

	// Destructor
	DefaultWindowListener::~DefaultWindowListener()
	{
		// Pass
	}
#pragma endregion

#pragma region Close / Resize / Gain Focus / Lose Focus
	// On Close
	void DefaultWindowListener::onClose(RenderWindow* window)
	{
		window->Close();
	}

	// On Resize
	void DefaultWindowListener::onResize(RenderWindow* window, const unsigned int width, const unsigned int height)
	{
		// Resize viewports...
		//printf("Window On Resize: %i x %i\r\n", width, height);
	}

	// On Gain Focus
	void DefaultWindowListener::onGainFocus(RenderWindow* window)
	{
		//printf("Window On Gain Focus\r\n");
	}

	// On Lose Focus
	void DefaultWindowListener::onLoseFocus(RenderWindow* window)
	{
		//printf("Window On Lose Focus\r\n");
	}
#pragma endregion

#pragma region Keyboard
	// On Key Press
	void DefaultWindowListener::onKeyPress(RenderWindow* window, const sf::Event::KeyEvent& key)
	{
		// Shutdown the program when the Escape key is pressed
		if (key.Code == sf::Key::Escape)
			quit();
	}
#pragma endregion
} // namespace Window
}